<html lang="en" xml:lang="en"><head>
<META http-equiv="Content-Type" content="text/html">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><META name="description" content="Description of the FeatureSetChooserForSingleLayer class."><meta name="content-language" content="en"><link href="rsrc/htmlhelp.css" rel="stylesheet" type="text/css"><title>Web AppBuilder for ArcGIS | Help - 

FeatureSetChooserForSingleLayer</title>
                <script type="text/javascript" language="JavaScript">
                    var pathL  = self.location.pathname.split ("/");
                    var fname = pathL[pathL.length-1];
                    var i = fname.lastIndexOf (".htm");
                    if (i>=0) {
                    fname = fname.substring (0, i)
                    } else {
                    //??
                    }
                    if (self.location.hash) {
				    		      fname = fname + self.location.hash;
						        }
                    self.location.replace ("../index.html#//" + fname);
                </script>
                </head><!--Publication GUID: [GUID-E7D1C130-8F87-4109-8D61-E73A46083F52]--><!--Topic GUID: [GUID-57E33265-1AF4-4BC0-86D2-2CA753E02C59]--><body><div id="content"><div class="header"><h1>

FeatureSetChooserForSingleLayer</h1><div id="breadcrumb"></div></div>  
<p id="GUID-C2579F1F-7170-484D-8046-100CEBCE71FA">
 The FeatureSetChooserForSingleLayer class allows you to select features from a feature layer by interacting with the map. It supports shortcut keys as well. Using the Shift key, you can add selected features into a currently-selected feature set. Using the Ctrl or Command key on a Mac, you can remove selected features from a currently-selected feature set.
</p>
<div class="section1" id="ESRI_SECTION1_874E8BC122F24B128E88BEFCF2A5DE2A" purpose="section1"><h2>AMD Module Require</h2><p id="GUID-4681FF57-99B7-4A45-BA46-64C0E6295DB2"><div class="codeblock" purpose="codeblock"><div class="highlight"><pre><code><span class="nx">require</span><span class="p">([</span><span class="s2">&quot;jimu/dijit/FeatureSetChooserForSingleLayer&quot;</span><span class="p">],</span> <span class="kd">function</span><span class="p">(</span><span class="nx">FeatureSetChooserForSingleLayer</span><span class="p">)</span> <span class="p">{</span> <span class="cm">/* code goes here */</span> <span class="p">});</span>
</code></pre></div>
</div></p></div><div class="section1" id="ESRI_SECTION1_D69FD2CBA347469E927CD11C6A9B1F04" purpose="section1"><h2>Constructor</h2><div class="block_table" id="TABLE_FB3E3B7A87094BBB9C30997D7B6225B4" purpose="block_table"><span class="table_title"></span><table class="table"><colgroup width="1.12*"></colgroup><tbody><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-E6B42A3F-BC35-4C1D-8B7E-94B7146A53F6"><span class="usertext">new FeatureSetChooserForSingleLayer(params, srcNodeRef)</span></p><p id="GUID-FB97692F-C7CC-4B82-94CE-515F58AF4239"> Creates a new <span class="usertext">FeatureSetChooserForSingleLayer</span> dijit.</p><p id="GUID-66547053-0F13-493E-B31A-DBA963576D1A">Parameters:<ul purpose="ul" id="UL_564F9B13C8F94BA2AF79428AB8117FA2"><li purpose="li" id="LI_39D33CD59AD34D02873082ECAF7C831D"><span class="usertext">&lt;Object&gt; params</span>—Required.  Parameters for the <span class="usertext">FeatureSetChooserForSingleLayer</span> dijit. See the options table below for details on the parameters.</li><li purpose="li" id="LI_96EA386C43B94842AAFD9ECC000424A4"><span class="usertext">&lt;DOMNode | String&gt; srcNodeRef</span>—Optional.  HTML element where <span class="usertext">FeatureSetChooserForSingleLayer</span> is rendered.</li></ul></p><p id="GUID-DF796DDC-B6C2-4471-A43E-98CF25A94587"> params properties:<ul purpose="ul" id="UL_5EC7AF68A52741D28DBD30CEEE4F759A"><li purpose="li" id="LI_5FE3EB0082A346F8A9E22F816E3CFF89"><span class="usertext">   &lt;Map&gt; map</span>—Required. The map instance.</li><li purpose="li" id="LI_E5E556DCD94B4EB68EA1122B55965BEA">    <span class="usertext">&lt;FeatureLayer&gt; featureLayer</span>—Required.     The feature layer the dijit interacts with.</li><li purpose="li" id="LI_2E9CBB367CEB4447BABC88370C77D6EB">  <span class="usertext">&lt;Boolean&gt; updateSelection</span>—Optional.   The default value is false. If set to true, the dijit updates the selection set of the original feature layer. If set to false, it  creates another layer to show the selected feature set and doesn't influence the original feature layer.</li></ul></p><p id="GUID-0D51F826-D6BA-462C-8ED2-231DE1CBAC21">Example:</p><div class="codeblock" purpose="codeblock"><div class="highlight"><pre><code><span class="nx">Sample</span><span class="o">:</span>
<span class="nx">require</span><span class="p">([</span><span class="err">&#39;</span><span class="nx">jimu</span><span class="o">/</span><span class="nx">dijit</span><span class="o">/</span><span class="nx">FeatureSetChooserForSingleLayer</span><span class="p">],</span> <span class="kd">function</span><span class="p">(</span><span class="nx">FeatureSetChooserForSingleLayer</span><span class="p">){</span>
  <span class="kd">var</span> <span class="nx">dijit</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">FeatureSetChooserForSingleLayer</span><span class="p">({</span>
    <span class="nx">map</span><span class="o">:</span> <span class="nx">map</span><span class="p">,</span>
    <span class="nx">featureLayer</span><span class="o">:</span> <span class="nx">layer</span><span class="p">,</span>
    <span class="nx">updateSelection</span><span class="o">:</span> <span class="kc">false</span>
  <span class="p">},</span> <span class="nx">srcNodeRef</span><span class="p">);</span>
  <span class="p">...</span>
<span class="p">});</span>
</code></pre></div>
</div></td></tr></tbody></table><span class="table_desc"></span></div></div><div class="section1" id="ESRI_SECTION1_CF80FDE99F3449F5BC7324A0F16041D1" purpose="section1"><h2>Methods</h2><div class="block_table" id="TABLE_B7FC2CEBC6BA4B7C9CF743B95969C644" purpose="block_table"><span class="table_title"></span><table class="table"><colgroup width="1.12*"></colgroup><tbody><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-B0A1B792-588F-4E4A-AD41-7B9F26847305"><span class="usertext">  disable()</span></p><p id="GUID-CE498133-B962-4D3C-AA62-CF074A45F441"> Disables the dijit. When disabled, you can't interact with the dijit.</p>
<p id="GUID-25E34538-F68C-4731-8607-4F40A66D8497">Return type:   Undefined.</p></td></tr></tbody></table><span class="table_desc"></span></div><div class="block_table" id="TABLE_37BBB1D62C004EA28F44373930F4ED59" purpose="block_table"><span class="table_title"></span><table class="table"><colgroup width="1.12*"></colgroup><tbody><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-6C3F0EEF-5BBE-48FF-A2EF-791EE293413F"><span class="usertext"> enable()</span></p><p id="GUID-544EB541-CEC0-4CE9-A28B-4828140195BD"> Enables the dijit.</p>
<p id="GUID-ED0266B3-B02F-4414-BEBC-3592E5DA0895">Return type:   Undefined.</p></td></tr></tbody></table><span class="table_desc"></span></div><div class="block_table" id="TABLE_282AE57C818F48649C3185319670DA38" purpose="block_table"><span class="table_title"></span><table class="table"><colgroup width="1.12*"></colgroup><tbody><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-8E51BD90-CF95-4AED-B3DC-BCD0BF51E4E7"><span class="usertext"> clearAllGraphics()</span></p><p id="GUID-5849C553-2F80-4FF0-9083-7A75E87FE8EF">  Clears all selected features.</p>
<p id="GUID-52CC0C5E-A034-44CB-AD66-74CF2A8F277E">Return type:   Undefined.</p></td></tr></tbody></table><span class="table_desc"></span></div><div class="block_table" id="TABLE_A1916F7ED1E84BA0AA5AAE93E64E67F9" purpose="block_table"><span class="table_title"></span><table class="table"><colgroup width="1.12*"></colgroup><tbody><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-F8999399-0622-4909-93E1-6C04EF866B93"><span class="usertext"> getFeatures()</span></p><p id="GUID-CD5D962B-ACDB-45DB-9CEF-D800C0C586D4">Gets your selected features.</p>
<p id="GUID-DE10B71D-193E-417F-9EC6-702883DFEF70">Return type:    Deferred. The deferred object resolves the feature array.</p></td></tr></tbody></table><span class="table_desc"></span></div></div><div class="section1" id="ESRI_SECTION1_35975ACA6FD742DA8017DFF1A283694D" purpose="section1"><h2>Events</h2><div class="block_table" id="TABLE_9DC80003F29D4AF5B35A15F3433F0B30" purpose="block_table"><span class="table_title"></span><table class="table"><colgroup width="1.12*"></colgroup><tbody><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-DBA49756-C4EF-44E1-BF16-D0859AA079D5"><span class="usertext"> loading</span></p><p id="GUID-CCB54324-CF2F-4672-8318-2ABE8366C23C"> Fires when you begin to select features.</p>
<p id="GUID-54CD41B4-8D50-42F3-BDBC-0C4C338189A8"> Event Object: Undefined.</p></td></tr></tbody></table><span class="table_desc"></span></div><div class="block_table" id="TABLE_101B585F4FF243CEB702AF20B02B60CD" purpose="block_table"><span class="table_title"></span><table class="table"><colgroup width="1.12*"></colgroup><tbody><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-AB788631-F4C9-4130-855A-5FE7F718E89E"><span class="usertext"> unloading</span></p><p id="GUID-BA9B47FA-0110-4262-ABA3-3C6B3AD08F13"> Fires when you finish selecting features.</p>
<p id="GUID-307177E0-D52C-4C32-8413-CE581C1CD018"> Event Object: Undefined.</p></td></tr></tbody></table><span class="table_desc"></span></div></div><div class="footer"> Copyright © 1995-2016 Esri. All rights reserved. </div></div></body></html>